<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php $SITES = getcache('sitelist','commons'); ?>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="keywords" content="11">

<meta name="description" content="">

<title>{$SITES[$siteid]['name']}</title>




<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script src="{APP_PATH}statics/third/layer/layer.js"></script>
<script>
;!function(){

//加载扩展模块
layer.config({
    extend: 'extend/layer.ext.js'
});


};
var index =null;
function login(){
	index=layer.open({
	  type: 1, //page层
	  area: ['500px', '350px'],
	  title: '로그인/登录',
	  shade: 0.6, //遮罩透明度
	  moveType: 1, //拖拽风格，0是默认，1是传统拖动
	  shift: 5, //0-6的动画形式，-1不开启
	  content: $("#login-div"),
	  shadeClose :false,
	});  
}
function register(){
	index=layer.open({
	  type: 1, //page层
	  area: ['500px', '500px'],
	  title: '회원가입/注册',
	  shade: 0.6, //遮罩透明度
	  moveType: 1, //拖拽风格，0是默认，1是传统拖动
	  shift: 5, //0-6的动画形式，-1不开启
	  content: $("#register-div"),
	  shadeClose :false,
	});  
}
</script>



<link type="text/css" rel="stylesheet" href="{CSS_PATH}style.css" />
<script type="text/javascript" src="{JS_PATH}scrolltopcontrol.js"></script>
<script type="text/javascript">
	$(function(){
		$("#dbright img").css({'height':25,'width':225,'margin-top':28}).attr("src","http://www.20152015.net/uploadfile/2016/0511/title_nav_right.jpg");
		$("#goto-register-button").click(function(){
			layer.closeAll();
			register();
		})
		function checkWindowWidth()
		{
			var window_width=$(window).width();
			if(window_width<1070)
			{
				$(".fe_t").css({'padding-left':0});
			}else{
				$(".fe_t").css({'padding-left':30});
			}
		}
		setInterval(checkWindowWidth, 100 )
		
	})
	
	function gotoRegister()
	{
		var nickname=$("#register-username").val();

		var password=$("#register-password").val();
		var pwdconfirm=$("#register-pwdconfirm").val();
		var email=$("#register-email").val();
		var mobile=$("#register-mobile").val();
		if(nickname=='')
		{
			return alert("用户名不能为空");
		}
		if(password=='')
		{
			return alert("请正确输入密码");
		}
		if(password!=pwdconfirm)
		{
			return alert("两次密码输入不一致");
		}
		if(mobile=="")
		{
			return alert("请正确输入手机号");
		}
		if(email=='')
		{
			return alert("请正确填写邮箱")
		}
		$.post(
			"?m=content&c=index&a=gotoRegister",
			{'nickname':nickname,'password':password,'pwdconfirm':pwdconfirm,'email':email,'mobile':mobile},
			function(data)
			{
				if(data.isok)
				{
					//alert(data.msg);
					layer.closeAll();
					window.location.reload()
					return 
				}
				window.location.reload()
				//return alert(data.msg);

			},
			'json'
			)
	}
	function gotoLogin()
	{
		var username=$("#login-username").val();

		var password=$("#login-password").val();
		$.post(
			"?m=content&c=index&a=gotoLogin",
			{'username':username,'password':password},
			function(data)
			{
				if(data.isok)
				{
				
					layer.closeAll();
					window.location.reload()

					return 
				}
				//return alert(data.msg);

			},
			'json'
			)
	}
	function gotoMyCollect()
	{

		{if $_SESSION['user_id']}
			window.open('/index.php?m=content&c=index&a=yigui');
		{else}
			login();
		{/if}
		
	}
	function gotoMyOrder()
	{

		{if $_SESSION['user_id']}
			window.open('/index.php?m=content&c=index&a=getOrderList');
		{else}
			login();
		{/if}
		
	}
</script>
<style type="text/css">

	.form-div{
		font-size: 20px;
	}
	.form-div label{
		margin-right: 15px;
		display: inline-block;
		width: 160px;
		text-align: right;
	}
	.form-div label span{
		color: #DF2E28
	}
	.form-div input{
		height: 30px;
		border: 1px solid #ccc;
		margin-left: 20px;
		border-radius: 5px;
		padding: 3px 5px;
	}
	.login-rows{
		margin-top: 30px;
	}
	.button{
		background: #F7F7F7;
		height: 40px;
		border: 1px solid #ccc;
		border-radius: 5px;
		margin: 0px 15px;
	}
</style>

</head>



<body>

<div id="login-div" class="form-div" style="display:none;padding-top:30px;">

	<div class="login-rows" align="center" ><label>아이디/登录名</label>:<input id="login-username" style="width:250px;" placeholder="아이디/登录名" type="text"></div>
	<div class="login-rows" align="center" ><label>비번/密码</label>:<input id="login-password" style="width:250px;" placeholder="비번/密码" type="text"></div>
	<div class="login-rows" align="center" ><button onclick="gotoLogin()" id="one" class="button" style="width:150px;">로그인/登录</button><button id="goto-register-button" class="button" style="width:150px;">회원가입/注册</button></div>

</div>
<div id="register-div" class="form-div" style="display:none;padding-top:10px;">

	<div class="login-rows" align="center" ><label><span class="register-icon">*</span>아이디/登录名</label>:<input id='register-username' style="width:250px;" placeholder="아이디/登录名" type="text"></div>
	<div class="login-rows" align="center" ><label><span class="register-icon">*</span>비번/密码</label>:<input id='register-password' style="width:250px;" placeholder="비번/密码" type="text"></div>
	<div class="login-rows" align="center" ><label><span class="register-icon">*</span>재확인/确认密码</label>:<input  id='register-pwdconfirm' style="width:250px;" placeholder="재확인/确认密码" type="text"></div>
	<div class="login-rows" align="center" ><label><span class="register-icon">*</span>휴대폰/电话</label>:<input  id='register-mobile' style="width:250px;" placeholder="휴대폰/电话" type="text"></div>
	<div class="login-rows" align="center" ><label><span class="register-icon">*</span>메일/邮箱</label>:<input  id='register-email' style="width:250px;" placeholder="메일/邮箱" type="text"></div>
	<div class="login-rows" align="center" ><button onclick="gotoRegister()" class="button" style="width:150px;">회원가입/注册</button></div>

</div>
<style type="text/css">
	body{
		/* display: inline-block; */
	}
</style>
<div class="top" style="position:relative;">

    	<a href="/" target="_self"><h1><script language="javascript" src="{APP_PATH}index.php?m=poster&c=index&a=show_poster&id=11"></script></h1></a>

    	<div class="center">

        	<div class="top_s" style="position: absolute;top: 0px;left: 0px;"><a href="#">{GGAO_PATH}</a></div>

			<div class="top_x" style="position: absolute;top: 30px;">

            	<input type="text" id="sousuo" placeholder="품번검색:" /><span id="search">search</span>

            </div>

        </div>

        <div style="position:absolute;right:30px;">

			<div style="margin-top:5px;margin-bottom:10px;">{if $_SESSION['user_id']}
				<span style="display: inline-block;margin-right:8px;">{mb_substr($_SESSION['username'],0,4,'utf-8')}&nbsp;&nbsp;,&nbsp;&nbsp;
					<a href="?m=content&c=index&a=gotoLoginOut">退出</a>&nbsp;&nbsp;
				</span>{else}
				<a onclick="login()" id="top-login" href="#" style="display: inline-block;margin-right:20px;">로그인/登录</a>{/if}
				<a style="cursor:pointer" target="_bank" onclick="gotoMyCollect()" id="top-yigui">&nbsp;&nbsp;나의옷장/我的衣柜(<span style="color:red;">{$_SESSION['collect_sum']}</span>)</a>
			<a href="#" onclick="gotoMyOrder()" style="display: inline-block;margin-left:20px;">문의.주문/咨询.订单(<span style="color:red;">{$_SESSION['order_sum']}</span>)</a>
			</div>
			<a style="position: absolute;right:10px;" href="index.php?m=content&c=index&a=daoh">
			<img src="http://www.20152015.net/uploadfile/2016/0511/title_nav_right.jpg"></a>
        	</div>

</div>

<div class="nav">

	{pc:content action="category" catid="0" siteid="$siteid" order="listorder ASC"}

	{loop $data $r}

		<a href="javascript:;" id="nav_{$r[catid]}" class="sdfdsfds" onclick="cli('{$r[catid]}');" target="_self"><dl><dt><b>{$r[catname]}</b></dt><dd><b>{$r[description]}</b></dd></dl></a>

	{/loop}

	{/pc}  

</div>



<div class="fen">

{pc:content action="category" catid="0" siteid="$siteid" order="listorder ASC"}

	{loop $data $r}

	<ul id="ul_{$r[catid]}">

		{pc:content action="category" siteid="$siteid" catid="$r[catid]" num="8"  order="listorder ASC"}

		{loop $data $z}

    	<li id="fen_{$z[catid]}"><a href="javascript:;" onclick="cli('{$z[catid]}');" target="_self">{$z[catname]}</a></li>

    	{/loop}

		{/pc}

    </ul>

	{/loop}

{/pc}

</div>

 

<input type="hidden" id="hidden" value="<?php if(isset($k)){echo $k;}else{echo '10';}?>"> 

<script type="text/javascript">

var $_GET = (function(){

    var url = window.document.location.href.toString();

    var u = url.split("?");

    if(typeof(u[1]) == "string"){

        u = u[1].split("&");

        var get = {};

        for(var i in u){

            var j = u[i].split("=");

            get[j[0]] = j[1]; 

        }

        return get;

    } else {

        return {};

    }

})();



	var $div_li = $(".nav a");

	if($_GET['f']){

		var get = '#nav_'+$_GET['f'];

		$(get).addClass('cur');

		$("#ul_"+$_GET['f']).show().siblings().hide();

		if(!$_GET['z']){	

			$("#ul_"+$_GET['f']+" > li").eq(0).addClass('cur');

		}else{

			$("#fen_"+$_GET['z']).addClass('cur');

		}

	}else{

		$div_li.eq(0).addClass('cur');

		$(".fen > ul").eq(0).show().siblings().hide();

	}



	$(".nav a").click(function(){

		var index = $div_li.index(this);

		$(this).addClass('cur').siblings().removeClass('cur');

		$(".fen > ul").eq(index).show().siblings().hide();

		$(".fen > ul").eq(index).children().eq(0).addClass('cur').siblings().removeClass('cur');

		

	});

	$(".fen > ul > li").click(function(){

		var index = $div_li.index(this);

		$(this).addClass('cur').siblings().removeClass('cur');	

	});

	

</script>























